/**
 * 
 */
package com.csc.bankingsystem.core.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csc.bankingsystem.core.dao.UserRoleDAO;
import com.csc.bankingsystem.core.entity.UserRole;
import com.csc.bankingsystem.core.service.UserRoleService;


/**
 * Implement all service operation of UserRoleService
 * @author angelkid
 *
 */
@Service("userRoleService")
@Transactional
public class UserRoleServiceImpl implements UserRoleService {

	@Autowired
	UserRoleDAO userRoleDAO;
	
	public UserRole find(long id) {
		return userRoleDAO.find(id);
	}

	public List<UserRole> findAll() {
		return userRoleDAO.findAll();
	}

	public Long countAll() {
		return userRoleDAO.countAll();
	}

	public Long save(UserRole userRole){
		return userRoleDAO.save(userRole);
	}

	public void update(UserRole userRole){
		userRoleDAO.update(userRole);
	}

	public void delete(UserRole userRole) {
		userRoleDAO.delete(userRole);
	}
}
